import request from '../request/request.js'

export default async (url)=>{
	const {data} = await  request.get(url)
		
	if(data){
		if (data.meta && data.meta.status !== 200){
			 uni.$showMessage()
			 Promise.reject(data)
		}
	}else Promise.reject(new Error('连接请求错误'))
	
	return data.message
}